package bomberman.runable;

import bomberman.swing.BomJPanel;
import bomberman.util.Constants;

/**
 * 地图刷新线程，一直开启
 * @author EX-FUHUICHAO001
 * 2016年9月22日17:50:00
 */
public class MyRunableFresh implements Runnable {

	private BomJPanel panel;
	
	public MyRunableFresh(BomJPanel panel){
		this.panel = panel;
	}
	
	public void run() {
		while(true){
			panel.repaint();
			try {
				Thread.sleep(Constants.MAP_SLEEP_TIME);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
	
	

	public BomJPanel getPanel() {
		return panel;
	}

	public void setPanel(BomJPanel panel) {
		this.panel = panel;
	}
	
}
